<!DOCTYPE html>
<html lang="zh-CN">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .title {
            color: aqua;
        }

        .active {
            color: chocolate;
        }

        .yellow {
            color: red;
        }

        .pink {
            color: pink;
        }

        .test {
            font-size: 18px;
        }
    </style>
</head>

<body>
    <div id="app">
        <!--静态样式-->
        <h1 class="title">真坏</h1>
        <p :class="color">肥牛饭</p>
        <button @click="handleClick">按钮</button>
        <!--动态样式-->
        <ul>
            <li>吃饭</li>
            <li>睡觉</li>
            <li>敲代码</li>
        </ul>

        <p :class="{test:true,yellow: true ,pink : false}">
            试试就试试
        </p>
    </div>
    <script src="./js/vue.js"></script>
    <script>
        const vm = new Vue({
            data: {
                color: "pink",
            },

            methods: {
                handleClick() {
                    this.color = this.color === "pink" ? "yellow" : "pink";
                }
            }
        })
        vm.$mount("#app");
    </script>
</body>

</html>